unit DMClient;

interface

uses
  System.SysUtils, System.Classes, kbmMWClient, kbmMWCustomConnectionPool,
  kbmMWClientDataset, kbmMemTable, kbmMWStreamFormat, kbmMWBinaryStreamFormat,
  kbmMWSecurity, kbmMWDCP2Crypt, kbmMWCustomTransport,
  kbmMWTCPIPIndyClientTransport, rtcInfo, rtcConn, rtcDataCli, rtcHttpCli,
  kbmMW2rtcCli;

type
  TdtmdlClientLink = class(TDataModule)
    kbmwpldsnLink: TkbmMWPooledSession;
    kbmMWDCP2Crypt1: TkbmMWDCP2Crypt;
    kbmwbnrystrmfrmtLink: TkbmMWBinaryStreamFormat;
    kbmccplLink: TkbmMWClientConnectionPool;
    kbmscLink: TkbmMWSimpleClient;
    rtchtpclntLink: TRtcHttpClient;
    kbmw2rtclntrnsprtLink: TkbmMW2RtcClientTransport;
    procedure DataModuleCreate(Sender: TObject);
  private
    procedure InitializeComponent();
  public
    { Public declarations }
  end;

var
  dtmdlClientLink: TdtmdlClientLink;

implementation

{%CLASSGROUP 'System.Classes.TPersistent'}

{$R *.dfm}
uses kbmMWGlobal,kbmMWZipStdTransStream;
procedure TdtmdlClientLink.DataModuleCreate(Sender: TObject);
begin
   InitializeComponent;
end;

procedure TdtmdlClientLink.InitializeComponent;
begin
  with rtchtpclntLink do
  begin
    ServerAddr:='127.0.0.1';
    ServerPort:='12582';
    AutoConnect:=True;
  end;

  with kbmw2rtclntrnsprtLink do
  begin
     RtcClient:=rtchtpclntLink;
     RtcFileName:='/kbm';

     Crypt:=kbmMWDCP2Crypt1;
     StreamFormat:='ZIPPED';
     StringConversion:=mwscFixed;
     MaxRetries:=2;
  end;

  with  kbmscLink do
  begin
    Password:='xalion@#123456';
    Username:='xalion';
    Transport:=kbmw2rtclntrnsprtLink;
  end;

  with kbmccplLink do
  begin
    Transport:= kbmw2rtclntrnsprtLink;
  end;

  with kbmwpldsnLink do
  begin
    ConnectionPool:=kbmccplLink;
    SessionName:='demo';
  end;
end;

end.
